package com.example.demoback.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demoback.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface UserMapper extends BaseMapper<User> {

    @Select("select * from user")
    List<Map<String,Object>> selectAll();



    @Select("select * from user where username = #{username} and password = #{password}")
    User selectByUsernameAndPassword(@Param("username") String username,
                                     @Param("password") String password);
}
